<template>
  <custom-layout>
    <shop-list>
      <shop-item v-for="(item, index) in list" :key="item.title" :price="item.price" :id="index + 1" :img-src="item['img-src']">
        <template #link>{{ item.title }}</template>
        <template #body>{{ item.body }}</template>
      </shop-item>
    </shop-list>
  </custom-layout>
</template>

<script setup lang="ts">
import ShopItem from "../components/ShopItem.vue"
import ShopList from "../components/ShopList.vue"
import CustomLayout from "../components/CustomLayout.vue"
import { request, getJSON } from "../network/main"
import { useStore } from "../store/main"
import { computed } from "vue"
const store = useStore()
const list = computed(() => store.state.goods)
getJSON(store)

</script>
<script lang="ts">
export default {
  name: "Home"
}
</script>
<style scoped lang="less">
@import "../vars";
</style>